package com.aiju.cash.ui.account.manager;

import java.util.Comparator;

/**
 * @author: 佐为
 * @date: 2017-03-30 10:28
 * @version: V1.0
 * @Description: 类目
 */
public class AccountType implements Comparator<AccountType> {

    public AccountType(String name, int pic, int position) {
        this.name = name;
        this.pic = pic;
        this.position = position;
        this.select = true;//默认选中
    }

    private int pic;//图片
    private String name;//名字
    private int position;//位置
    private boolean select;//是否选中


    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public int getPic() {
        return pic;
    }

    public void setPic(int pic) {
        this.pic = pic;
    }

    public int getPosition() {
        return position;
    }

    public void setPosition(int position) {
        this.position = position;
    }

    public boolean isSelect() {
        return select;
    }

    public void setSelect(boolean select) {
        this.select = select;
    }

    @Override
    public int compare(AccountType o1, AccountType o2) {
        return o2.getPosition() - o1.getPosition();
    }
}
